//*************************************************************************************
//* 作    者： z hunter
//* 创建时间： 2021-09-25 09:28:59
//* 描    述： 项目基础框架入口（基础内容）
//* ************************************************************************************
using System;
using UFrame;
using Key = System.Int32;

internal class AppFacade : UFrame.AgentContext<AppFacade, Facade<Key>>
{
    internal static void RegisterProxy<P>(IProxy<Key, P> prox)
    {
        Instance.RegisterProxy(prox);
    }
    internal static void RegisterProxy<T1>(Key proxyKey, T1 data)
    {
        Instance.RegisterProxy(proxyKey, data);
    }
    internal static void RegisterProxy<T1, T2>(Key proxyKey, T1 data, T2 data2)
    {
        Instance.RegisterProxy(proxyKey, data, data2);
    }
    internal static void RegisterProxy<T1, T2, T3>(Key proxyKey, T1 data, T2 data2, T3 data3)
    {
        Instance.RegisterProxy(proxyKey, data, data2, data3);
    }
    internal static void RegisterProxy<T1, T2, T3, T4>(Key proxyKey, T1 data, T2 data2, T3 data3, T4 data4)
    {
        Instance.RegisterProxy(proxyKey, data, data2, data3, data4);
    }
    internal static void RegisterProxy<T1, T2, T3, T4, T5>(Key proxyKey, T1 data, T2 data2, T3 data3, T4 data4, T5 data5)
    {
        Instance.RegisterProxy(proxyKey, data, data2, data3, data4, data5);
    }
    internal static void CansaleRetrieve(Key name)
    {
        Instance.CansaleRetrieve(name);
    }
    internal static P RetrieveProxy<P, T>(Key name) where P : IProxy<Key, T>
    {
        return Instance.RetrieveProxy<P, T>(name);
    }
    internal static void RetrieveProxy<P, T>(Key name, Action<P> onRetieved) where P : IProxy<Key, T>
    {
        Instance.RetrieveProxy<P, T>(name, onRetieved);
    }
    internal static void RetrieveProxy<T>(Key name, Action<IProxy<Key, T>> onRetieved)
    {
        Instance.RetrieveProxy<T>(name, onRetieved);
    }
    internal static IProxy<Key, T> RetrieveIProxy<T>(Key name)
    {
        return Instance.RetrieveIProxy<T>(name);
    }
    internal static void RetrieveData<T>(Key name, Action<T> onRetieved)
    {
        Instance.RetrieveData<T>(name, onRetieved);
    }
    internal static T RetrieveData<T>(Key name)
    {
        return Instance.RetrieveData<T>(name);
    }
    internal static bool RetrieveData<T1, T2>(Key proxyKey, out T1 t1, out T2 t2)
    {
        return Instance.RetrieveData(proxyKey, out t1, out t2);
    }

    internal static void RetrieveData<T1, T2>(Key proxyKey, Action<T1, T2> retrieved)
    {
        Instance.RetrieveData(proxyKey, retrieved);
    }

    internal static IProxy<Key, T1, T2> RetrieveIProxy<T1, T2>(Key proxyKey)
    {
        return Instance.RetrieveIProxy<T1, T2>(proxyKey);
    }

    internal static void RetrieveProxy<T1, T2>(Key proxyKey, Action<IProxy<Key, T1, T2>> retrieved)
    {
        Instance.RetrieveProxy<T1, T2>(proxyKey, retrieved);
    }

    internal static P RetrieveProxy<P, T1, T2>(Key proxyKey) where P : IProxy<Key, T1, T2>
    {
        return Instance.RetrieveProxy<P, T1, T2>(proxyKey);
    }

    internal static void RetrieveProxy<P, T1, T2>(Key proxyKey, Action<P> retrieved) where P : IProxy<Key, T1, T2>
    {
        Instance.RetrieveProxy<P, T1, T2>(proxyKey, retrieved);
    }

    internal static bool RetrieveData<T1, T2, T3>(Key proxyKey, out T1 t1, out T2 t2, out T3 t3)
    {
        return Instance.RetrieveData<T1, T2, T3>(proxyKey, out t1, out t2, out t3);
    }

    internal static void RetrieveData<T1, T2, T3>(Key proxyKey, Action<T1, T2, T3> retrieved)
    {
        Instance.RetrieveData<T1, T2, T3>(proxyKey, retrieved);
    }

    internal static IProxy<Key, T1, T2, T3> RetrieveIProxy<T1, T2, T3>(Key proxyKey)
    {
        return Instance.RetrieveIProxy<T1, T2, T3>(proxyKey);
    }

    internal static void RetrieveProxy<T1, T2, T3>(Key proxyKey, Action<IProxy<Key, T1, T2, T3>> retrieved)
    {
        Instance.RetrieveProxy<T1, T2, T3>(proxyKey, retrieved);
    }

    internal static P RetrieveProxy<P, T1, T2, T3>(Key proxyKey) where P : IProxy<Key, T1, T2, T3>
    {
        return Instance.RetrieveProxy<P, T1, T2, T3>(proxyKey);
    }

    internal static void RetrieveProxy<P, T1, T2, T3>(Key proxyKey, Action<P> retrieved) where P : IProxy<Key, T1, T2, T3>
    {
        Instance.RetrieveProxy<P, T1, T2, T3>(proxyKey, retrieved);
    }

    internal static bool RetrieveData<T1, T2, T3, T4>(Key proxyKey, out T1 t1, out T2 t2, out T3 t3, out T4 t4)
    {
        return Instance.RetrieveData<T1, T2, T3, T4>(proxyKey, out t1, out t2, out t3, out t4);
    }

    internal static void RetrieveData<T1, T2, T3, T4>(Key proxyKey, Action<T1, T2, T3, T4> retrieved)
    {
        Instance.RetrieveData<T1, T2, T3, T4>(proxyKey, retrieved);
    }

    internal static IProxy<Key, T1, T2, T3, T4> RetrieveIProxy<T1, T2, T3, T4>(Key proxyKey)
    {
        return Instance.RetrieveIProxy<T1, T2, T3, T4>(proxyKey);
    }

    internal static void RetrieveProxy<T1, T2, T3, T4>(Key proxyKey, Action<IProxy<Key, T1, T2, T3, T4>> retrieved)
    {
        Instance.RetrieveProxy<T1, T2, T3, T4>(proxyKey, retrieved);
    }

    internal static P RetrieveProxy<P, T1, T2, T3, T4>(Key proxyKey) where P : IProxy<Key, T1, T2, T3, T4>
    {
        return Instance.RetrieveProxy<P, T1, T2, T3, T4>(proxyKey);
    }

    internal static void RetrieveProxy<P, T1, T2, T3, T4>(Key proxyKey, Action<P> retrieved) where P : IProxy<Key, T1, T2, T3, T4>
    {
        Instance.RetrieveProxy<P, T1, T2, T3, T4>(proxyKey, retrieved);
    }

    internal static bool RetrieveData<T1, T2, T3, T4, T5>(Key proxyKey, out T1 t1, out T2 t2, out T3 t3, out T4 t4, out T5 t5)
    {
        return Instance.RetrieveData<T1, T2, T3, T4, T5>(proxyKey, out t1, out t2, out t3, out t4, out t5);
    }

    internal static void RetrieveData<T1, T2, T3, T4, T5>(Key proxyKey, Action<T1, T2, T3, T4, T5> retrieved)
    {
        Instance.RetrieveData<T1, T2, T3, T4, T5>(proxyKey, retrieved);
    }

    internal static IProxy<Key, T1, T2, T3, T4, T5> RetrieveIProxy<T1, T2, T3, T4, T5>(Key proxyKey)
    {
        return Instance.RetrieveIProxy<T1, T2, T3, T4, T5>(proxyKey);
    }

    internal static void RetrieveProxy<T1, T2, T3, T4, T5>(Key proxyKey, Action<IProxy<Key, T1, T2, T3, T4, T5>> retrieved)
    {
        Instance.RetrieveProxy<T1, T2, T3, T4, T5>(proxyKey, retrieved);
    }

    internal static P RetrieveProxy<P, T1, T2, T3, T4, T5>(Key proxyKey) where P : IProxy<Key, T1, T2, T3, T4, T5>
    {
        return Instance.RetrieveProxy<P, T1, T2, T3, T4, T5>(proxyKey);
    }

    internal static void RetrieveProxy<P, T1, T2, T3, T4, T5>(Key proxyKey, Action<P> retrieved) where P : IProxy<Key, T1, T2, T3, T4, T5>
    {
        Instance.RetrieveProxy<P, T1, T2, T3, T4, T5>(proxyKey, retrieved);
    }

    internal static void RegisterProxy(IProxy<Key> proxy)
    {
        Instance.RegisterProxy(proxy);
    }

    internal static void RemoveProxy(Key name)
    {
        Instance.RemoveProxy(name);
    }
    internal static void RegisterMediator(IMediatorBase<Key> mediator)
    {
        Instance.RegisterMediator(mediator);
    }
    internal static void RemoveMediator(IMediatorBase<Key> mediator)
    {
        Instance.RemoveMediator(mediator);
    }

    internal static void RegisterCommand<T>(Key observerKey) where T : ICommandBase, new()
    {
        Instance.RegistCommand<T>(observerKey);
    }

    internal static bool HaveCommand(Key observerKey)
    {
        return Instance.HaveCommand(observerKey);
    }

    internal static void RemoveCommand(Key observerKey)
    {
        Instance.RemoveCommand(observerKey);
    }

    internal static void RegistCommand(Key observerKey, ICommandBase command)
    {
        Instance.RegistCommand(observerKey, command);
    }

    internal static void RegistCommand<T>(Key observerKey) where T : ICommandBase, new()
    {
        Instance.RegistCommand<T>(observerKey);
    }

    internal static bool HasObserver(Key observerKey)
    {
        return Instance.HasObserver(observerKey);
    }

    internal static bool HasProxy(Key proxyKey)
    {
        return Instance.HasProxy(proxyKey);
    }

    internal static void RegistEvent(Key observerKey, Action action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RegistEvent<T>(Key observerKey, Action<T> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RegistEvent<T1, T2>(Key observerKey, Action<T1, T2> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RegistEvent<T1, T2, T3>(Key observerKey, Action<T1, T2, T3> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RegistEvent<T1, T2, T3, T4>(Key observerKey, Action<T1, T2, T3, T4> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RegistEvent<T1, T2, T3, T4, T5>(Key observerKey, Action<T1, T2, T3, T4, T5> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RemoveEvent(Key observerKey, Action action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RemoveEvent<T>(Key observerKey, Action<T> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RemoveEvent<T1, T2>(Key observerKey, Action<T1, T2> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RemoveEvent<T1, T2, T3>(Key observerKey, Action<T1, T2, T3> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RemoveEvent<T1, T2, T3, T4>(Key observerKey, Action<T1, T2, T3, T4> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RemoveEvent<T1, T2, T3, T4, T5>(Key observerKey, Action<T1, T2, T3, T4, T5> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RegistEvent<R>(Key observerKey, Func<R> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RemoveEvent<R>(Key observerKey, Func<R> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RegistEvent<T1, R>(Key observerKey, Func<T1, R> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RemoveEvent<T1, R>(Key observerKey, Func<T1, R> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RegistEvent<T1, T2, R>(Key observerKey, Func<T1, T2, R> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RemoveEvent<T1, T2, R>(Key observerKey, Func<T1, T2, R> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }
    internal static void RegistEvent<T1, T2, T3, R>(Key observerKey, System.Func<T1, T2, T3, R> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RemoveEvent<T1, T2, T3, R>(Key observerKey, Func<T1, T2, T3, R> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RegistEvent<T1, T2, T3, T4, R>(Key observerKey, Func<T1, T2, T3, T4, R> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RemoveEvent<T1, T2, T3, T4, R>(Key observerKey, Func<T1, T2, T3, T4, R> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }

    internal static void RegistEvent<T1, T2, T3, T4, T5, R>(Key observerKey, Func<T1, T2, T3, T4, T5, R> action, IAlive alive = null,bool strict = false)
    {
        Instance.RegistEvent(observerKey, action, alive, strict);
    }

    internal static void RemoveEvent<T1, T2, T3, T4, T5, R>(Key observerKey, Func<T1, T2, T3, T4, T5, R> action)
    {
        Instance.RemoveEvent(observerKey, action);
    }
    internal static void SendNotification(Key observerKey)
    {
        Instance.SendNotification(observerKey);
    }
    internal static void SendNotification<T>(Key observerKey, T body)
    {
        Instance.SendNotification(observerKey, body);
    }
    internal static void SendNotification<T1, T2>(Key observerKey, T1 body, T2 body2)
    {
        Instance.SendNotification(observerKey, body, body2);
    }
    internal static void SendNotification<T1, T2, T3>(Key observerKey, T1 body, T2 body2, T3 body3)
    {
        Instance.SendNotification(observerKey, body, body2, body3);
    }
    internal static void SendNotification<T1, T2, T3, T4>(Key observerKey, T1 body, T2 body2, T3 body3, T4 body4)
    {
        Instance.SendNotification(observerKey, body, body2, body3, body4);
    }
    internal static void SendNotification<T1, T2, T3, T4, T5>(Key observerKey, T1 body, T2 body2, T3 body3, T4 body4, T5 body5)
    {
        Instance.SendNotification(observerKey, body, body2, body3, body4, body5);
    }
}